package com.cardbaobao.cardbabyclient.ui.dialog;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.widget.TextView;

import com.cardbaobao.cardbabyclient.R;


/**
 * LoadingDialog自定义正在加载对话框
 * Created by zad
 * 2016/7/28 14:40
 */

public class LoadingDialog extends Dialog {

    private TextView mTvShow;

    public LoadingDialog(Context context) {
        super(context, R.style.progressdialog);
        setContentView(R.layout.dialog_circle);
        setCanceledOnTouchOutside(false);
        initView();
    }

    private void initView() {
        mTvShow = (TextView) findViewById(R.id.id_txt_show);
        mTvShow.setTextColor(Color.WHITE);
        mTvShow.setAlpha(0.65f);
    }

    public void setShowText(String text) {
        if (text != null) {
            mTvShow.setText(text);
            mTvShow.setVisibility(View.VISIBLE);
        }else{
            mTvShow.setVisibility(View.GONE);
        }
    }

}
